(function() {
  var Commodity, Mongoose, Schema;

  Mongoose = require('mongoose');

  Schema = Mongoose.Schema;

  Commodity = new Schema({
    title: {
      type: String,
      trim: true,
      index: true,
      required: true
    },
    barcode: {
      type: String,
      trim: true,
      index: true,
      required: true
    },
    price: Number,
    "package": String,
    eachPackTotal: Number,
    specification: String,
    productionDate: Date,
    shelfList: String,
    desc: String,
    tags: Array,
    url: String,
    pics: [
      {
        url: String,
        area: {
          height: Number,
          width: Number
        }
      }
    ],
    createTime: {
      type: Date,
      "default": Date.now
    },
    modifiedTime: Date
  });

  module.exports = Commodity;

}).call(this);
